#include "stdafx.h"
#include "Dialogue.h"

int* pIntReusable = NULL;
Dialogue::Dialogue()
{

}

Dialogue::~Dialogue()
{

}

void Dialogue::AddEventsAndKeyPairing(string key)
{
	pIntReusable = new int(0);
	m_vEventFlags.push_back(pIntReusable);
	m_mEventFlagKey[key] = pIntReusable;
}

void Dialogue::SetFlag(string key)
{
	pIntReusable = m_mEventFlagKey[key];
	*pIntReusable = 1;
}

bool Dialogue::CheckFlags()
{
	static int _i = 0;
	static int nEVentFlagSize = (int)m_vEventFlags.size();
	
	for(_i = 0; _i < nEVentFlagSize; ++_i)
		if(m_vEventFlags[_i] == 0)
			return false;

	return true;
}